<%@ page import="edu.uow.devdocs.Project" %>


<tr><form action='search'>

	<td>
	<g:textField name="name" maxlength="100" value="${projectInstance?.name}"/>
	</td>



	<td>
	<g:jqDatePicker name="startDate" precision="day"  value="${projectInstance?.startDate}" default="none" noSelection="['': '']" />
	</td>



	<td>
	<g:jqDatePicker name="endDate" precision="day"  value="${projectInstance?.endDate}" default="none" noSelection="['': '']" />
	</td>



	<td>
	<g:select id="status" name="status.id" from="${edu.uow.devdocs.ProjectStatus.list()}" optionKey="id" value="${projectInstance?.status?.id}" class="many-to-one" noSelection="['null': '']"/>
	</td>



	<td>
	<g:field type="number" name="estimatedHours" value="${fieldValue(bean: projectInstance, field: 'estimatedHours')}"/>
	</td>



	<td>
	<g:textArea name="comments" cols="40" rows="5" maxlength="10000" value="${projectInstance?.comments}"/>
	</td>



	<td>
	<g:checkBox name="availableToAllFlag" value="${projectInstance?.availableToAllFlag}" />
	</td>



	<td>
	<g:select id="projectType" name="projectType.id" from="${edu.uow.devdocs.ProjectType.list()}" optionKey="id" value="${projectInstance?.projectType?.id}" class="many-to-one" noSelection="['null': '']"/>
	</td>



	<td>
	<g:textField name="costCentre" maxlength="100" value="${projectInstance?.costCentre}"/>
	</td>



	<td>
	<g:field type="number" name="estimatedPercentComplete" value="${fieldValue(bean: projectInstance, field: 'estimatedPercentComplete')}"/>
	</td>



	<td>
	<g:select id="businessOwner" name="businessOwner.id" from="${edu.uow.devdocs.Person.list()}" optionKey="id" required="" value="${projectInstance?.businessOwner?.id}" class="many-to-one"/>
	</td>



	<td>
	
<ul class="one-to-many">
<g:each in="${projectInstance?.commentHistory?}" var="c">
    <li><g:link controller="commentHistory" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="commentHistory" action="create" params="['project.id': projectInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'commentHistory.label', default: 'CommentHistory')])}</g:link>
</li>
</ul>

	</td>



	<td>
	<g:select id="developmentManager" name="developmentManager.id" from="${edu.uow.devdocs.Person.list()}" optionKey="id" required="" value="${projectInstance?.developmentManager?.id}" class="many-to-one"/>
	</td>



	<td>
	<g:checkBox name="flagBillable" value="${projectInstance?.flagBillable}" />
	</td>



	<td>
	<g:select name="persons" from="${edu.uow.devdocs.Person.list()}" multiple="multiple" optionKey="id" size="5" value="${projectInstance?.persons*.id}" class="many-to-many"/>
	</td>



	<td>
	<g:select id="system" name="system.id" from="${edu.uow.devdocs.System.list()}" optionKey="id" required="" value="${projectInstance?.system?.id}" class="many-to-one"/>
	</td>

<button type='submit'>Go!</button></form></tr>
